Optimal. Leaf size=157 \[ -\frac{F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d \left (a^2-b^2\right )}-\frac{b E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a d \left (a^2-b^2\right )}+\frac{\left (3 a^2-b^2\right ) \Pi \left (\frac{2 b}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a d (a-b) (a+b)^2}+\frac{b^2 \sin (c+d x) \sqrt{\cos (c+d x)}}{a d \left (a^2-b^2\right ) (a+b \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.436418, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2802, 3059, 2639, 3002, 2641, 2805} \[ -\frac{F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d \left (a^2-b^2\right )}-\frac{b E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a d \left (a^2-b^2\right )}+\frac{\left (3 a^2-b^2\right ) \Pi \left (\frac{2 b}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a d (a-b) (a+b)^2}+\frac{b^2 \sin (c+d x) \sqrt{\cos (c+d x)}}{a d \left (a^2-b^2\right ) (a+b \cos (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2802
Rule 3059
Rule 2639
Rule 3002
Rule 2641
Rule 2805
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{\cos (c+d x)} (a+b \cos (c+d x))^2} \, dx &=\frac{b^2 \sqrt{\cos (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac{\int \frac{\frac{1}{2} \left (2 a^2-b^2\right )-a b \cos (c+d x)-\frac{1}{2} b^2 \cos ^2(c+d x)}{\sqrt{\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{a \left (a^2-b^2\right )}\\ &=\frac{b^2 \sqrt{\cos (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}-\frac{\int \frac{-\frac{1}{2} b \left (2 a^2-b^2\right )+\frac{1}{2} a b^2 \cos (c+d x)}{\sqrt{\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{a b \left (a^2-b^2\right )}-\frac{b \int \sqrt{\cos (c+d x)} \, dx}{2 a \left (a^2-b^2\right )}\\ &=-\frac{b E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a \left (a^2-b^2\right ) d}+\frac{b^2 \sqrt{\cos (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}-\frac{\int \frac{1}{\sqrt{\cos (c+d x)}} \, dx}{2 \left (a^2-b^2\right )}+\frac{\left (3 a^2-b^2\right ) \int \frac{1}{\sqrt{\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 a \left (a^2-b^2\right )}\\ &=-\frac{b E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a \left (a^2-b^2\right ) d}-\frac{F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{\left (a^2-b^2\right ) d}+\frac{\left (3 a^2-b^2\right ) \Pi \left (\frac{2 b}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a (a-b) (a+b)^2 d}+\frac{b^2 \sqrt{\cos (c+d x)} \sin (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}\\ \end{align*}
Mathematica [A] time = 3.27017, size = 242, normalized size = 1.54 \[ \frac{\frac{4 b^2 \sin (c+d x) \sqrt{\cos (c+d x)}}{\left (a^2-b^2\right ) (a+b \cos (c+d x))}+\frac{\frac{2 \left (4 a^2-3 b^2\right ) \Pi \left (\frac{2 b}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a+b}-\frac{2 \sin (c+d x) \left (\left (2 a^2-b^2\right ) \Pi \left (-\frac{b}{a};\left .-\sin ^{-1}\left (\sqrt{\cos (c+d x)}\right )\right |-1\right )+2 a (a+b) F\left (\left .\sin ^{-1}\left (\sqrt{\cos (c+d x)}\right )\right |-1\right )-2 a b E\left (\left .\sin ^{-1}\left (\sqrt{\cos (c+d x)}\right )\right |-1\right )\right )}{a \sqrt{\sin ^2(c+d x)}}+8 a \left (\frac{a \Pi \left (\frac{2 b}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a+b}-F\left (\left .\frac{1}{2} (c+d x)\right |2\right )\right )}{(a-b) (a+b)}}{4 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 4.931, size = 612, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sqrt{\cos \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sqrt{\cos \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]